using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._StandardFeatureAnalysisTools._ManageData
{
    /// <summary>
    /// <para>Overlay Layers</para>
    /// <para>Overlays the geometries from multiple layers into one single layer.  Overlay can be used to combine, erase, modify, or update spatial features. Overlay is much more than a merging of geometries; all the attributes of the features taking part in the overlay are carried through to the result.</para>
    /// <para>将多个图层的几何图形叠加到一个图层中。 叠加可用于合并、擦除、修改或更新空间要素。叠加不仅仅是几何图形的合并;参与叠加的特征的所有属性都将传递到结果中。</para>
    /// </summary>    
    [DisplayName("Overlay Layers")]
    public class OverlayLayers : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public OverlayLayers()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_inputLayer">
        /// <para>Input Layer</para>
        /// <para>The point, line, or polygon features that will be overlaid with the overlay layer.</para>
        /// <para>将叠加图层叠加的点、线或面要素。</para>
        /// </param>
        /// <param name="_overlayLayer">
        /// <para>Overlay Layer</para>
        /// <para>The features that will be overlaid with the input layer features.</para>
        /// <para>将与输入图层要素叠加的要素。</para>
        /// </param>
        /// <param name="_outputName">
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// </param>
        public OverlayLayers(object _inputLayer, object _overlayLayer, object _outputName)
        {
            this._inputLayer = _inputLayer;
            this._overlayLayer = _overlayLayer;
            this._outputName = _outputName;
        }
        public override string ToolboxName => "Standard Feature Analysis Tools";

        public override string ToolName => "Overlay Layers";

        public override string CallName => "sfa.OverlayLayers";

        public override List<string> AcceptEnvironments => ["extent"];

        public override object[] ParameterInfo => [_inputLayer, _overlayLayer, _outputName, _overlayType.GetGPValue(), _outputType.GetGPValue(), _snapToInput.GetGPValue(), _tolerance, _output];

        /// <summary>
        /// <para>Input Layer</para>
        /// <para>The point, line, or polygon features that will be overlaid with the overlay layer.</para>
        /// <para>将叠加图层叠加的点、线或面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _inputLayer { get; set; }


        /// <summary>
        /// <para>Overlay Layer</para>
        /// <para>The features that will be overlaid with the input layer features.</para>
        /// <para>将与输入图层要素叠加的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Overlay Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _overlayLayer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _outputName { get; set; }


        /// <summary>
        /// <para>Overlay Type</para>
        /// <para><xdoc>
        ///   <para>The type of overlay to be performed.</para>
        ///   <bulletList>
        ///     <bullet_item>Intersect—Computes a geometric intersection of the input layers. Features or portions of features that overlap in both the input layer and overlay layer will be written to the output layer. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union—Computes a geometric union of the input layers. All features and their attributes will be written to the output layer. This option is only valid if both the input layer and the overlay layer contain polygon features.</bullet_item><para/>
        ///     <bullet_item>Erase—Only those features or portions of features in the overlay layer that are not within the features in the input layer are written to the output.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要执行的叠加类型。</para>
        ///   <bulletList>
        ///     <bullet_item>相交 （Intersect） - 计算输入图层的几何交点。在输入图层和叠加图层中重叠的要素或要素的一部分将被写入输出图层。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>并集 （Union） - 计算输入图层的几何并集。所有要素及其属性都将写入输出图层。仅当输入图层和叠加图层都包含面要素时，此选项才有效。</bullet_item><para/>
        ///     <bullet_item>拭除 - 仅将叠加图层中不在输入图层要素内的要素或部分要素写入输出。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Overlay Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _overlayType_value _overlayType { get; set; } = _overlayType_value._INTERSECT;

        public enum _overlayType_value
        {
            /// <summary>
            /// <para>Intersect</para>
            /// <para>Intersect—Computes a geometric intersection of the input layers. Features or portions of features that overlap in both the input layer and overlay layer will be written to the output layer. This is the default.</para>
            /// <para>相交 （Intersect） - 计算输入图层的几何交点。在输入图层和叠加图层中重叠的要素或要素的一部分将被写入输出图层。这是默认设置。</para>
            /// </summary>
            [Description("Intersect")]
            [GPEnumValue("INTERSECT")]
            _INTERSECT,

            /// <summary>
            /// <para>Union</para>
            /// <para>Union—Computes a geometric union of the input layers. All features and their attributes will be written to the output layer. This option is only valid if both the input layer and the overlay layer contain polygon features.</para>
            /// <para>并集 （Union） - 计算输入图层的几何并集。所有要素及其属性都将写入输出图层。仅当输入图层和叠加图层都包含面要素时，此选项才有效。</para>
            /// </summary>
            [Description("Union")]
            [GPEnumValue("UNION")]
            _UNION,

            /// <summary>
            /// <para>Erase</para>
            /// <para>Erase—Only those features or portions of features in the overlay layer that are not within the features in the input layer are written to the output.</para>
            /// <para>拭除 - 仅将叠加图层中不在输入图层要素内的要素或部分要素写入输出。</para>
            /// </summary>
            [Description("Erase")]
            [GPEnumValue("ERASE")]
            _ERASE,

        }

        /// <summary>
        /// <para>Output Type</para>
        /// <para><xdoc>
        ///   <para>The type of intersection you want to find. This parameter is only valid when the overlay type is Intersect.</para>
        ///   <bulletList>
        ///     <bullet_item>Input—The features returned will be the same geometry type as the input layer or overlay layer with the lowest dimension geometry. If all inputs are polygons, the output will contain polygons. If one or more of the inputs are lines and none of the inputs are points, the output will be line. If one or more of the inputs are points, the output will contain points. This is the default.</bullet_item><para/>
        ///     <bullet_item>Line— Line intersections will be returned. This is only valid if none of the inputs are points.</bullet_item><para/>
        ///     <bullet_item>Point— Point intersections will be returned. If the inputs are line or polygon, the output will be a multipoint layer.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要查找的交叉点类型。仅当叠加类型为“相交”时，此参数才有效。</para>
        ///   <bulletList>
        ///     <bullet_item>输入 - 返回的要素将与具有最低尺寸几何的输入图层或叠加图层的几何类型相同。如果所有输入都是多边形，则输出将包含多边形。如果一个或多个输入是线，而没有一个输入是点，则输出将为线。如果一个或多个输入是点，则输出将包含点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>线 - 将返回线交点。仅当所有输入都不是点时，这才有效。</bullet_item><para/>
        ///     <bullet_item>点- 将返回点交点。如果输入为直线或面，则输出将为多点图层。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _outputType_value _outputType { get; set; } = _outputType_value._INPUT;

        public enum _outputType_value
        {
            /// <summary>
            /// <para>Input</para>
            /// <para>Input—The features returned will be the same geometry type as the input layer or overlay layer with the lowest dimension geometry. If all inputs are polygons, the output will contain polygons. If one or more of the inputs are lines and none of the inputs are points, the output will be line. If one or more of the inputs are points, the output will contain points. This is the default.</para>
            /// <para>输入 - 返回的要素将与具有最低尺寸几何的输入图层或叠加图层的几何类型相同。如果所有输入都是多边形，则输出将包含多边形。如果一个或多个输入是线，而没有一个输入是点，则输出将为线。如果一个或多个输入是点，则输出将包含点。这是默认设置。</para>
            /// </summary>
            [Description("Input")]
            [GPEnumValue("INPUT")]
            _INPUT,

            /// <summary>
            /// <para>Line</para>
            /// <para>Line— Line intersections will be returned. This is only valid if none of the inputs are points.</para>
            /// <para>线 - 将返回线交点。仅当所有输入都不是点时，这才有效。</para>
            /// </summary>
            [Description("Line")]
            [GPEnumValue("LINE")]
            _LINE,

            /// <summary>
            /// <para>Point</para>
            /// <para>Point— Point intersections will be returned. If the inputs are line or polygon, the output will be a multipoint layer.</para>
            /// <para>点- 将返回点交点。如果输入为直线或面，则输出将为多点图层。</para>
            /// </summary>
            [Description("Point")]
            [GPEnumValue("POINT")]
            _POINT,

        }

        /// <summary>
        /// <para>Snap To Input</para>
        /// <para><xdoc>
        ///   <para>Specifies if feature vertices in the input layer are allowed to move. The default is unchecked and means if the distance between features is less than the tolerance value, all features from both layers can move to allow snapping to each other. When checked, only features in overlay layer can move to snap to the input layer features.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Unchecked—Allow features from both layers to snap their vertices to each other. This is the default.</bullet_item><para/>
        ///       <bullet_item>Checked—Only allow features in the overlay layer to move vertices to snap to the input layer.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否允许输入图层中的要素折点移动。默认值为未选中，表示如果要素之间的距离小于容差值，则两个图层中的所有要素都可以移动以允许相互捕捉。选中后，只有叠加图层中的要素才能移动以捕捉到输入图层要素。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>未选中 - 允许两个图层中的要素相互捕捉其折点。这是默认设置。</bullet_item><para/>
        ///       <bullet_item>选中 - 仅允许叠加图层中的要素移动折点以捕捉到输入图层。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Snap To Input")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _snapToInput_value _snapToInput { get; set; } = _snapToInput_value._false;

        public enum _snapToInput_value
        {
            /// <summary>
            /// <para>SNAP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SNAP")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_SNAP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SNAP")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Tolerance</para>
        /// <para>A double value of the minimum distance separating all feature coordinates as well as the distance a coordinate can move in X or Y (or both). The units of tolerance are the same as the units of the input layer's coordinate system.</para>
        /// <para>分隔所有要素坐标的最小距离以及坐标可在 X 或 Y（或两者）中移动的距离的双精度值。公差单位与输入图层坐标系的单位相同。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _tolerance { get; set; } = null;


        /// <summary>
        /// <para>Output</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output { get; set; }


        public OverlayLayers SetEnv(object extent = null)
        {
            base.SetEnv(extent: extent);
            return this;
        }

    }

}